package com.xx.hdfsFx.promptStage;

import javafx.scene.control.Button;
import javafx.scene.control.TextField;

public class CreatePrompt {
    public final Button button;
    public final TextField textField;
    private PromptPaneTool promptPaneTool;

    public CreatePrompt(String info) {
        promptPaneTool = new PromptPaneTool();
        promptPaneTool.addTitle("新建");
        textField = promptPaneTool.addInput(info, "", "名称");
        textField.setPrefWidth(630);
        button = promptPaneTool.addButton("创建", "取消");
        promptPaneTool.initStage(630, 300);
    }

    public void showStage() {
        promptPaneTool.nowStage.show();
    }

    public void closeStage() {
        promptPaneTool.nowStage.close();
    }
}
